<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserLogTable extends Migration
{
    /**
     * Run the migrations.
     * 用户操作日志
     * @return void
     */
    public function up()
    {
        Schema::create('user_log', function (Blueprint $table) {
            $table->increments('id');
            $table->string('user_id')->comment('用户id');
            $table->string('log_title')->nullable()->comment('操作类型');
            $table->text('notes')->nullable()->comment('注释');
            $table->string('log_ip')->nullable()->comment('操作ip');
            $table->string('prefix')->nullable()->comment('模块');
            $table->string('log_url')->nullable()->comment('操作url');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_log');
    }
}
